

import type { Iexpress } from './entity';
import type { IPageParams } from '@/types/table'
import request from '@/api/request'

export function getPageList(params: IPageParams) {
  return request({
    url: `admin/express/list`,
    method: 'get',
    params,
    loading: true
  })
}

export function expressDel(data) {
  return request({
    url: `admin/express/delete`,
    method: 'post',
    data
  })
}
export function expressinfo(id) {
  return request({
    url: 'admin/express/info',
    method: 'get',
    params: { id }
  })
}
export function expressSelect(id) {
  return request({
    url: `admin/express/select`,
    method: 'get'
  })
}

export function expressAddup(data) {
  return request({
    url: `admin/express/${!data.id ? 'save' : 'update'}`,
    method: 'post',
    data
  })
}
// 物流公司修改状态
export function expressUpdateShow<T>(data: any) {
  return request({
    url: '/admin/express/update/show',
    method: 'post',
    data
  })
}